//package com.william.springsecurity.exception;
//
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.security.access.AccessDeniedException;
//import org.springframework.web.bind.annotation.ControllerAdvice;
//import org.springframework.web.bind.annotation.ExceptionHandler;
//
//@ControllerAdvice
//@Slf4j
//public class HandlerControllerException {
//
//    @ExceptionHandler(RuntimeException.class)
//    public String handException(RuntimeException e){
//        if(e instanceof AccessDeniedException){
//            return "redirect:/403.jsp";
//        }
//        log.error(e.getMessage());
//        return "redirect:/500.jsp";
//    }
//}
